<?php
 @header("content-type:text/html;charset=utf-8");
 @header("Access-Control-Allow-Origin:*");
 $conn = mysql_connect("localhost:3306","root","root");
 mysql_select_db("1904");
 mysql_query("set character set utf8");
 mysql_query("set names utf8");
$user_id=$_GET["user_id"];
$sql="select * from shoppingcar where user_id=$user_id";
$result=mysql_query($sql);
$arr=array();
while($item=mysql_fetch_assoc($result)){
$arr[]=$item;
}
echo json_encode($arr);
?>